package com.oa.hyperion.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oa.hyperion.entity.Menu;
import com.oa.hyperion.entity.RoleMenuMerge;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleMenuMapper extends BaseMapper<RoleMenuMerge> {

    @Select("select m.* from menu m ,role_menu_merge rm where m.id=rm.menu_id and rm.role_id = #{roleId}")
    List<Menu> findMenuByRole(int roleId);


}
